<?php

namespace app\api\controller;

use app\api\model\Page as PageModel;
use app\api\model\Setting as SettingModel;

/**
 * 页面控制器
 * Class Index
 * @package app\api\controller
 */
class Page extends Controller
{

    /**
     * 单页详情
     * @param $page_id
     * @return array
     * @throws \app\common\exception\BaseException
     * @throws \think\Exception
     * @throws \think\exception\DbException
     */
    public function detail($page_id)
    {
        $detail = PageModel::detail($page_id);
        $setting = SettingModel::getItem("share");
        return $this->renderSuccess(compact('detail', 'setting'));
    }


}
